package cz.uvn.orthopedy.client.entity;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable
public class ScheduleEntry implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private Long ownerId;
	
	@Persistent
	private int day;
	
	@Persistent
	private Long hallId;
	
	@Persistent
	private Type type;
	
	@Persistent
	private Operation.Type operationType;
	
	public ScheduleEntry() {
	}

	public ScheduleEntry(Long id, Long ownerId, int day, Long hallId,
			Type type, Operation.Type operationType) {
		this.id = id;
		this.ownerId = ownerId;
		this.day = day;
		this.hallId = hallId;
		this.type = type;
		this.operationType = operationType;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
	}

	public int getDay() {
		return day;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public Long getHallId() {
		return hallId;
	}

	public void setHallId(Long hallId) {
		this.hallId = hallId;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public Operation.Type getOperationType() {
		return operationType;
	}

	public void setOperationType(Operation.Type operationType) {
		this.operationType = operationType;
	}

	public enum Type {
		Owned, Reserve, General
	}
}
